package course;

/**
 * @author zouran
 * createDate：2024/4/16  13:25
 */

public class Triangle {
    double a, b, c = 0.0;

    public Triangle(double a, double b, double c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }

    public boolean isTriangle() {
        boolean result = false;
        if (a > 0 && b > 0 && c > 0) {
            if ((a + b > c) && (a + c > b) && (b + c > a)) {
                result = true;
            }
        }
        return result;
    }

    public boolean isIsoscelesTriangle() {

        return (a == b) || (a == c) || (b == c);
    }

    public boolean isEquilateralTriangle() {
        return a == b && b == c;
    }
}
